Skip to content

Conversation

@rasamassen
Copy link

@rasamassen rasamassen commented Sep 5, 2025

Description

ListItemRun now works!

Depends on #2821

Limitations

  • In the Library, there's currently no way to pass a fontStyle for the whole ListItemRun, nor for TextRun. Without being able to pass a fontStyle to the whole Run and then specify specific changes within the run, it makes it much harder to make small changes. Let's say I want a list that's all size => 22, color => purple, bold => true, but there's one little item I want to underline. I'd have to either pass all the variables on every line of the run or I'd have to setup two different fontStyles. It would be simpler to setup one fontStyle and then pass the small change as a custom fontStyle where DIFF would override the default for the run (but if no change, default still applies).

Checklist:

  • My CI is 🟢
  • I have covered by unit tests my new code (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes
  • I have updated the changelog

@coveralls
Copy link

coveralls commented Sep 5, 2025

Coverage Status

coverage: 96.765% (+0.008%) from 96.757%
when pulling eebb61a on rasamassen:ListItemRun
into 0ab0b49 on PHPOffice:master.

@rasamassen rasamassen changed the title RTF Writer: Create ListItemRun RTF Writer: ListItemRun - Create Oct 4, 2025
oleibman added a commit to oleibman/PHPWord that referenced this pull request Nov 19, 2025
I made RTF usable some time ago. @rasamassen has recently done a lot of useful work to cover many missing areas. Since who knows when those changes will be merged, I intend to incorporate much of that work. I will do this with several pushes, each based on one or more of those changes. This one is based on PR PHPOffice#2821 (fixes issue PHPOffice#1106), and PR PHPOffice#2823.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants